import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

// https://vite.dev/config/
export default defineConfig({
  server: {
    proxy: {
      "/node-api": {
        target: "http://180.76.248.182:10679",
        // target: "http://180.76.248.182:10678",
        rewrite: (path) => path.replace(/^\/node-api/, "/"),
      },
      "/ws": {
        target: "ws://180.76.248.182:10679",
        // target: "http://180.76.248.182:10678",
        ws: true,
      },
    },
  },
  plugins: [react()],
  resolve: {
    alias: {
      "@": "/src",
    },
  },
});
